package com.woniuxy.cloud.batteryassembly.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.woniuxy.cloud.batteryassembly.dto.PageBatteryDto;
import com.woniuxy.cloud.batteryassembly.model.Battery;
import com.woniuxy.cloud.dto.BatteryDto;
import com.woniuxy.cloud.dto.UpdateBatteryDto;
import com.woniuxy.cloud.param.*;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author gaorui
 * @since 2022-02-09
 */
public interface IBatteryService extends IService<Battery> {

    //根据ID查询电池信息
    Battery findById(Integer id);

    PageBatteryDto listBattery(ListBatteryParam listBatteryParam);

    List<BatteryDto> batteriesIsHealth(BatteriesIsHealthParam param);

    List<Battery> findBatteryByIds(List<Integer> ids);

    //添加电池信息
    Boolean addBattery(BatteryParam batteryParam);

    //删除电池信息
    Boolean deleteBattery(List<Integer> batteryIds);

    //修改电池信息
    Boolean updateBattery(BatteryParam batteryParam);

    Boolean updateBattery(UpdateParam updateParam);

    Boolean updateList(UpdateListParam updateListParam);

    //批量添加电池
    Boolean addBatteryList(AddListBatteryParam addListBatteryParam);

    List<BatteryDto> listBatteryByLocationIdAndTypeId(Integer locationId, Integer typeId);
}
